<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('离乌申请数据列表')" />
    <style type="text/css">
        select {
            width: 100px;
        }
    </style>
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li class="select-time">
                                <label>录入时间：</label>
                                <input type="text" class="time-input"  placeholder="开始时间" name="params[beginCreateDatetime]"/>
                                <span>-</span>
                                <input type="text" class="time-input"  placeholder="结束时间" name="params[endCreateDatetime]"/>
                            </li>
                            <li class="select-time">
                                <label>最新操作时间：</label>
                                <input type="text" class="time-input"  placeholder="开始时间" name="params[beginUpdateDatetime]"/>
                                <span>-</span>
                                <input type="text" class="time-input"  placeholder="结束时间" name="params[endUpdateDatetime]"/>
                            </li>

                            <li class="select-time">
                                <label>审核时间：</label>
                                <input type="text" class="time-input"  placeholder="开始时间" name="params[beginShclsj]"/>
                                <span>-</span>
                                <input type="text" class="time-input"  placeholder="结束时间" name="params[endShclsj]"/>
                            </li>


                            <li class="select-time">
                                <label>入乌日期：</label>
                                <input type="text" class="time-input"  placeholder="开始时间" name="params[beginRwrq]"/>
                                <span>-</span>
                                <input type="text" class="time-input"  placeholder="结束时间" name="params[endRwrq]"/>
                            </li>



                            <li class="select-time">
                                <label>预期离乌日期：</label>
                                <input type="text" class="time-input"  placeholder="开始时间" name="params[beginYqlwrq]"/>
                                <span>-</span>
                                <input type="text" class="time-input"  placeholder="结束时间" name="params[endYqlwrq]"/>
                            </li>

                            <li class="select-time">
                                <label>核酸检测日期：</label>
                                <input type="text" class="time-input"  placeholder="开始时间" name="params[beginJcbgRq]"/>
                                <span>-</span>
                                <input type="text" class="time-input"  placeholder="结束时间" name="params[endJcbgRq]"/>
                            </li>


                        </ul>
                    </div>

                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">

                            </div>
                        </div>

                        <div class="col-sm-12">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">区县街道社区：</label>
                                <div id="element1" class="row">
                                    <div class="col-sm-1">
                                        <select id="quyu" name="qjCode" class="quyu form-control m-b" data-first-title="选择区域">
                                            <option value="">请选择</option>
                                            <option value="天山区" selected>天山区</option>
                                        </select>
                                    </div>
                                    <div class="col-sm-1">
                                        <select id="jiedao" name="jdbCode" class="jiedao form-control m-b" data-first-title="选择街道">
                                            <option value="">请选择</option>
                                            <option value="燕儿窝街道" selected>燕儿窝街道</option>
                                        </select>
                                    </div>
                                    <div class="col-sm-1">
                                        <select id="shequ" name="sqCode" class="shequ form-control m-b" data-first-title="选择社区" >
                                            <option value="红雁池社区" selected >红雁池社区</option>
                                        </select>
                                    </div>

                                    <label class="col-sm-1 control-label">近3天是否有症状</label>
                                    <div class="col-sm-1">
                                        <select  class="form-control" name="styc" th:with="type=${@dict.getType('sys_yes_no')}" title="近3天是否有发热、咳嗽等症状" style="width: 100px">
                                            <option value="">所有</option>
                                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                        </select>
                                    </div>

                                    <div class="col-sm-1">
                                        <select  class="form-control" name="spzt" th:with="type=${@dict.getType('b_spzt')}" style="width: 140px">
                                            <option value="">所有审批状态</option>
                                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
                                        </select>
                                    </div>


                                    <div class="col-sm-2">
                                        <input name="sjhm" class="form-control"placeholder="填报人的手机号码" type="text" >
                                    </div>

                                </div>
                            </div>

                        </div>
                        <div class="col-sm-12">
                        <div class="form-group">

                            <label class="col-sm-1 control-label">人员类型：</label>
                            <div class="col-sm-1">
                                <select name="sfjn" class="form-control " th:with="type=${@dict.getType('b_rylx')}" >
                                    <option value="">人员类型</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>


                                <label class="col-sm-1 control-label">暂住所类型：</label>
                            <div class="col-sm-1">
                                <select class="form-control "  name="zzslx" th:with="type=${@dict.getType('b_zzslx')}" style="width: 120px">
                                    <option value="">暂住所类型</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>
                                <label class="col-sm-1 control-label">离乌方式：</label>
                            <div class="col-sm-1">
                                <select class="form-control "  name="lwfs" th:with="type=${@dict.getType('b_jtfs')}" style="width: 100px">
                                    <option value="">离乌方式</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>
                                <label class="col-sm-1 control-label">航班/车次/车牌号：</label>
                            <div class="col-sm-1">
                                <input class="form-control " type="text" name="cphm" placeholder="航班/车次/车牌号"/>
                            </div>
                                <label class="col-sm-1 control-label">返程目的地：</label>
                            <div class="col-sm-1">
                                <input class="form-control " placeholder="返程目的地" type="text" name="fcmdd"/>
                            </div>
                            <div class="col-sm-1">
                                <!--<input name="mz" class="form-control"placeholder="请输入您的民族" type="text" required>-->
                                <select name="mz" class="form-control m-b" th:with="type=${@dict.getType('b_ry_mz')}" >
                                    <option value="">所有族别</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>

                        </div>

                        </div>
                        <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">证件类型：</label>
                            <div class="col-sm-1">
                                <select name="zjlx" class="form-control "  th:with="type=${@dict.getType('b_zjlx')}" >
                                    <option value="">证件类型</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>
                            <label class="col-sm-1 control-label ">证件号码：</label>
                            <div class="col-sm-1">
                                <input name="zjhm" class="form-control" placeholder="证件号码" type="text" >
                            </div>

                            <label class="col-sm-1 control-label ">申请人姓名：</label>
                            <div class="col-sm-1">
                                <input name="xm" class="form-control" placeholder="查询姓名" type="text" >
                            </div>

                            <div class="col-sm-1">
                                <select name="xb" class="form-control " th:with="type=${@dict.getType('sys_user_sex')}" >
                                    <option value="">所有性别</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>


                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>


                        </div>
                        </div>

                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="lwsq:lwsq:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="lwsq:lwsq:edit">
                    <i class="fa fa-edit"></i> 审批
                </a>

                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="lwsq:lwsq:export">
                    <i class="fa fa-download"></i> 导出
                </a>
                <!--<a class="btn btn-warning" onclick="approve()" shiro:hasPermission="lwsq:lwsq:export">
                    <i class="fa fa-download"></i> 审批
                </a>

                 <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="lwsq:lwsq:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>

                <script type="text/javascript">
                    function approve() {
                        var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
                        if (rows.length == 0) {
                            $.modal.alertWarning("请选择一条记录");
                            return;
                        }
                        var prefix = ctx + "lwsq/lwsq";
                        var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];


                        var url=prefix+"/approvepage/"+id;
                        var data = { "ids": rows.join() };

                        $.modal.open("修改" + table.options.modalName, url);

                        $.operate.submit(url, "post", "json", data);
                    }
                </script>-->
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table" style="width: 2800px"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
     <th:block th:include="include :: jquery-cxselect-js" />
     <script src="../static/js/xj.city.js" th:src="@{/js/xj.city.js}"></script>
     <script>


         var data = init_xj_city_picker;

         $('#element1').cxSelect({
             selects: ['quyu', 'jiedao', 'shequ'],
             jsonName: 'name',
             jsonValue: 'code',
             jsonSub: 'children',
             data: data
         });

     </script>

    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('lwsq:lwsq:edit')}]];
        var removeFlag = [[${@permission.hasPermi('lwsq:lwsq:remove')}]];
        var spztDatas = [[${@dict.getType('b_spzt')}]];
        var xbDatas = [[${@dict.getType('sys_user_sex')}]];
        var sfjnDatas = [[${@dict.getType('b_rylx')}]];
        var stycDatas = [[${@dict.getType('sys_yes_no')}]];
        var zjlxDatas = [[${@dict.getType('b_zjlx')}]];
        var zzslxDatas = [[${@dict.getType('b_zzslx')}]];
        var lwfsDatas = [[${@dict.getType('b_jtfs')}]];
        var jcbgDatas = [[${@dict.getType('sys_yes_no')}]];
        var nationsDatas = [[${@dict.getType('b_ry_mz')}]];
        var prefix = ctx + "lwsq/lwsq";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "离乌申请数据",
                showFullscreen: true,
                pageSize: 6,
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '主键',
                    visible: false
                },
                {
                    field: 'createDatetime',
                    title: '录入时间'
                },
                {
                    field: 'updateDatetime',
                    title: '操作时间'
                },
                {
                    field: 'spzt',
                    title: '审核状态',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(spztDatas, value);
                    }
                },
                {
                    field: 'zjlx',
                    title: '证件类型',
                    width: '90px',
                    align: 'left',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(zjlxDatas, value);
                    }
                },
                {
                    field: 'zjhm',
                    title: '证件号码'
                },
                {
                    field: 'xm',
                    title: '申请人姓名'
                },
                {
                    field: 'xb',
                    title: '性别',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(xbDatas, value);
                    }
                },
                {
                     field: 'mz',
                     title: '族别',
                    formatter: function(value, row, index) {
                    return $.table.selectDictLabel(nationsDatas, value);
                    }
                },
                {
                    field: 'by3',
                    title: '年龄',
                },
                {
                    field: 'sfjn',
                    title: '人员类型',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(sfjnDatas, value);
                    }
                },
                {
                    field: 'sjhm',
                    title: '联系方式'
                },
                {
                    field: 'rwrq',
                    title: '入乌日期'
                },
                {
                    field: 'zzslx',
                    title: '暂住所类型',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(zzslxDatas, value);
                    }
                },
                {
                    field: 'by4',
                    title: '入驻时间'
                },
                // {
                //     field: 'sqCode',
                //     title: '所属区县-管委会'
                // },
                {
                    field: 'sqName',
                    title: '所属社区'
                },
                {
                    field: 'xxdz',
                    title: '详细地址/隔离点',
                    align: 'left',
                    width: "300px"
                },
                {
                    field: 'by1',
                    title: '房间号'
                },
                {
                    field: 'styc',
                    title: '近3天是否发热咳嗽等症状',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(stycDatas, value);
                    }
                },
                {
                    field: 'yqlwrq',
                    title: '预期离乌日期'
                },
                {
                    field: 'fcmdd',
                    title: '返程目的地'
                },
                {
                    field: 'by2',
                    title: '离乌事由'
                },
                {
                    field: 'lwfs',
                    title: '离乌方式',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(lwfsDatas, value);
                    }
                },
                {
                    field: 'cphm',
                    title: '航班/车次/车牌号'
                },

                {
                    field: 'hsjc',
                    title: '个人核酸检测',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(jcbgDatas, value);
                    }
                },
                {
                    field: 'hsjcRq',
                    title: '核酸检测日期'
                },
                {
                    field: 'skjc',
                    title: '双抗检测'
                },
                {
                    field: 'skjcRq',
                    title: '双抗检测日期'
                },
                // {
                //     field: 'by8',
                //     title: '离开住所时间'
                // },
                // {
                //     field: 'by9',
                //     title: '到达站台时间'
                // },
                {
                    title: '操作',
                    align: 'center',
                    width: '140px',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>审批</a> ');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>